home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / file viewer (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1987-01-01  |  9.4 KB  |  263 lines

  1. 10 on-(peek(24576)=173andpeek(25000)=76)goto220
  2. 20 c=7:x=42:poke53272,23:printchr$(147):poke53280,11:poke53281,12
  3. 30 for i=55296 to 55296+39:poke i,c:next
  4. 40 for i=55336 to 56216 step 40:poke i,c:next
  5. 50 for i=55375 to 56255 step 40:poke i,c:next
  6. 60 for i=56256 to 56256+39:poke i,c:next
  7. 70 for i=1024 to 1063:poke i,x:next
  8. 80 for i=1063 to 2023 step 40:poke i,x:next
  9. 90 for i=2023 to 1984 step-1:poke i,x:next
  10. 100 for i=1984 to 1024 step-40:poke i,x:next
  11. 110 printtab(91)"[144][204][207][193][196][211][212][193][210][160][208][210][197][211][197][206][212][211]"
  12. 120 printtab(91)"[213][204][212][210][193] [198][201][204][197]-[214][201][197][215][197][210]"
  13. 130 printtab(58)"by"
  14. 140 printtab(53)"[210].[215]. [194]ob [203]ober"
  15. 150 printtab(90)"([195]) [195]opyright  1987"
  16. 160 printtab(86)"[204][207][193][196][211][212][193][210] is [206][207][212] [208]ublic [196]omain"
  17. 170 printtab(83)"[208]lease respect the author's rights"
  18. 180 printtab(89)" [208][210][197][211][211] [193][206][217] [203][197][217] [212][207] [211][212][193][210][212] "
  19. 190 geta$:ifa$=""then190
  20. 200 print"[145]"tab(10)" [204]oading [205][204] [210]outines  "
  21. 210 load"file viewer.ml",8,1
  22. 220 md=24576:sp=25856:gp=25918:oc=25992:cc=25995:cr=26230:ww=26357:rp=26394
  23. 230 poke53280,.:poke53281,.:poke788,52:dima$(112):printchr$(142):so=26721:ez=26812
  24. 240 s=1:a=0
  25. 250 print"[147][158]":k=7:a$="[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]":gosub310
  26. 260 k=8:a$="[221]    ultra seq-print    [221]":gosub310
  27. 270 k=9:a$="[221]      version 5.6      [221]":gosub310
  28. 280 k=10:a$="[221]     r.w. bob kober    [221]":gosub310
  29. 290 k=11:a$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]":gosub310
  30. 300 goto460
  31. 310 m=len(a$):fori=1tom/2:print"":forj=1tok:print"";:next
  32. 320 printspc(20-i)left$(a$,i)right$(a$,i):next
  33. 330 return
  34. 450 poke150,160:sysgp:poke198,.:wait198,1:poke198,.
  35. 460 poke53280,.:poke53281,.
  36. 470 syscc:poke53272,21:print"[147]"tab(8)"[144][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  37. 480 printtab(8)"[221]      main menu      [221]"
  38. 490 printtab(8)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  39. 500 fori=1to300:next:poke2,5:poke878,20:sysoc
  40. 510 ifbobthenpoke150,168:sysgp:goto700
  41. 520 printtab(43)"use <<-- embedded (cr) -->> ignore"
  42. 530 printtab(2)"[150][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  43. 540 printtab(3)"[158][169]  [223][146][150]                         [158][129][169]  [223][155][146]"
  44. 550 printtab(3)"[158] f1 [146][150]  send output to screen  [129] f2 [146]"
  45. 560 printtab(3)"[158][223]  [146][169][150]                        [158] [129][223]  [146][169]"
  46. 570 printtab(42)"[154][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  47. 580 printtab(3)"[149][169]  [223][146]                         [156][169]  [223]"
  48. 590 printtab(3)"[149] f3 [146]  [154]40 columns to printer  [156] f4 [146]"
  49. 600 printtab(3)"[149][223]  [146][169]                         [156][223]  [146][169]"
  50. 610 printtab(42)"[153][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  51. 620 printtab(3)"[152][169]  [223][146]                         [150][169]  [223]"
  52. 630 printtab(3) "[152] f5 [146] [153] 80 columns to printer  [150] f6 [146]"
  53. 640 printtab(3)"[152][223]  [146][169]                         [150][223]  [146][169]"
  54. 650 printtab(42)"[156][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  55. 660 printtab(3)"[169]  [223][146]                         [169]  [223]"
  56. 670 printtab(3) " f7 [146][156] disk housekeeping  [129]quit  f8 [146]"
  57. 680 printtab(3)"[223]  [146][169]                         [223]  [146][169]"
  58. 690 ifbo=0thenbob=1:poke150,168:syssp
  59. 700 poke198,.:close15:open15,8,15:goto2490
  60. 710 geta$:on-(a$="a")goto1200:on-(a$="s")goto2480:ifa$<"[133]"ora$>chr$(141)then710
  61. 720 f$=right$(str$(asc(a$)-132),1)
  62. 730 on(asc(a$)-132)goto740,760,780,1500,750,770,790,1440,2460:goto710
  63. 740 gosub960:gosub800:goto920
  64. 750 f$="2":goto740
  65. 760 f$="3":poke600,0:gosub970:gosub800:oncolgoto910,2130
  66. 770 f$="4":poke600,1:gosub970:gosub800:oncolgoto910,2130
  67. 780 f$="5":gosub980:gosub800:goto910
  68. 790 f$="6":gosub980:gosub800:goto910
  69. 800 print"":poke214,x-2:print:print"[152]  ($=directory m=menu)[145][145]"
  70. 810 poke19,32:print"[158]  enter seq filename :";:gosub60500:ff$=b$
  71. 820 ifff$="m"then510
  72. 830 ifff$<>"$"thensyscc:x1=34:return
  73. 840 close15:open15,8,15:ifff$="$"thenprint#15,"i":input#15,e,e$:ifethenprint"[147]":gosub1400
  74. 850 ifethen470
  75. 860 syscc:printchr$(142):sysmd:print:close15:open15,8,15:syscc
  76. 870 ifpeek(598)=34then470
  77. 880 x1=0:ff$=""
  78. 890 ff=peek(580+x1):ifff=34thenreturn
  79. 900 ff$=ff$+chr$(ff):x1=x1+1:goto890
  80. 910 open4,4,7:gosub1330:ifqqthen470
  81. 920 open2,8,2,ff$:gosub1390:on-(e<>0)goto470:gosub1050
  82. 930 close2:close4:sys65511:open15,8,15:x1=0
  83. 940 gosub1020:poke214,23:print:print"        [150] [208]ress f5 for the [205]enu [146]        [145]"
  84. 950 geta$:on-(a$<>chr$(135))goto950:goto470
  85. 960 forx=6to8:poke781,x:sys59903:next:return
  86. 970 forx=11to13:poke781,x:sys59903:next:gosub990:return
  87. 980 forx=16to18:poke781,x:sys59903:next:return
  88. 990 poke214,11:print:printtab(6)"1[146] or [154]2[146] columns?"
  89. 1000 getcol$:ifcol$<"1"orcol$>"2"then1000
  90. 1010 col=val(col$):return
  91. 1020 on-(s=0)goto2530:forl=54272to54295:pokel,0:next:poke54296,15:poke54277,8:poke54278,255
  92. 1030 poke54276,23:fory=1to3:f2=8:poke54273,2:forx=1to5:poke54287,f2:f2=f2*1.4
  93. 1040 next:next:forw=1to8:poke54287,f2:f2=f2*1.07:next:poke54278,15:return
  94. 1050 rp$="[208][210][201][206][212][197][210]":iff$="1"orf$="2"thenrp$="[210][197][193][196][197][210] "
  95. 1060 syscc:printchr$(14):print"[147]"tab(2)"[144]***********************************"
  96. 1070 printtab(2)"*    [198]"f$" [213][204][212][210][193][160][211][197][209]-[198][201][204][197][160]"rp$"    *"
  97. 1080 printtab(2)"***********************************"
  98. 1090 poke214,23:print:print"[200]old shift to pause - [208]ress f6 to abort[145][145]"
  99. 1100 fori=1to300:next:poke2,12:poke878,20:sysoc
  100. 1110 poke214,23:print:print"[150][200]old shift to pause - [158][208]ress f6 to abort[145][145]"
  101. 1120 onval(f$)goto1130,1140,1150,1160,1170,1180
  102. 1130 sysrp,40,0,0:x1=0:return
  103. 1140 sysrp,39,1,0:x1=0:return
  104. 1150 gosub1190:sysrp,40,0,1:x1=0:return
  105. 1160 gosub1190:sysrp,39,1,1:x1=0:return
  106. 1170 gosub1190:sysrp,80,0,1:xi=0:return
  107. 1180 gosub1190:sysrp,79,1,1:xi=0:return
  108. 1190 fori=1to5:print#4:next:return
  109. 1200 a=1-a:poke820,a
  110. 1210 goto2510
  111. 1220 poke198,.:wait198,1:forx=11to13:poke781,x:sys59903:next:print"[145][145][145][145]":goto460
  112. 1230 on-(s=0)goto2530:forl=54272to54295:pokel,0:next:poke54296,15:poke54277,8:poke54278,255
  113. 1240 poke54276,21:poke54287,40:forz=1tot:forf1=255to0step-6:poke54273,f1:nextf1
  114. 1250 forf1=0to255step50:poke54273,f1:nextf1:nextz:forf2=15to0step-.1
  115. 1260 poke54296,f2:next:poke54277,128:poke54278,250:return
  116. 1270 on-(s=0)goto2530:forl=54272to54295:pokel,0:next:poke54296,15
  117. 1280 poke54277,8:poke54278,255:poke54276,23
  118. 1290 forz=1to1:f1=10:fory=1to6:f2=30:poke54273,f1:forx=1to3:poke54287,f2
  119. 1300 f2=f2/1.2:nextx:f1=f1*1.5:nexty:forw=1to30:poke54273,f1
  120. 1310 poke54287,5:forv=1to5:nextv
  121. 1320 f1=f1/1.5:nextw:nextz:poke54278,15:return
  122. 1330 close4:ifst=0thenopen4,4,7:qq=0:return
  123. 1340 print"[150]      the printer is not on line"
  124. 1350 print"     turn it on, and press any key"
  125. 1360 print"        press f5 for the menu":gosub1270
  126. 1370 wait198,1:geta$:ifa$="[135]"thenqq=1:return
  127. 1380 open4,4,7:goto1330
  128. 1390 input#15,e,e$:ife=0thenreturn
  129. 1400 print"[147]         disk error encountered"
  130. 1410 printtab(20-len(e$)/2)e$:gosub1270
  131. 1420 print"          any key to continue"
  132. 1430 wait198,1:close2:close4:return
  133. 1440 k=21:a$=" [158]     are you sure?     ":gosub310
  134. 1450 wait198,1:geta$:on-(a$="y")goto1470:print"[145][145][145]"
  135. 1460 goto510
  136. 1470 print"[150]";:printtab(8)" use ultra again, soon "
  137. 1480 poke198,.:t=3:gosub1230
  138. 1490 close15:open15,8,15,"r0:hello connect=hello connect":input#15,er%:close15
  139. 1495 ifer%<>63 then end
  140. 1497 load"hello connect",8
  141. 1500 ff=0
  142. 1510 print"[155]":poke214,8:print
  143. 1520 printtab(6)"[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  144. 1530 printtab(6)"[221]                         [221]"
  145. 1540 printtab(6)"[221] disk house keeping menu [221]"
  146. 1550 printtab(6)"[221] [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183] [221]"
  147. 1560 printtab(6)"[221]                         [221]"
  148. 1570 printtab(6)"[221] 1. scratch a file       [221]"
  149. 1580 printtab(6)"[221] 2. re-name a file       [221]"
  150. 1590 printtab(6)"[221] 3. format (new) a disk  [221]"
  151. 1600 printtab(6)"[221] 4. view directory       [221]"
  152. 1610 printtab(6)"[221] 5. return to main menu  [221]"
  153. 1620 printtab(6)"[221]                         [221]"
  154. 1630 printtab(6)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  155. 1640 poke198,.:wait198,1:geta$:on-(a$="[135]")goto510:ifa$<"1"ora$>"5"then1640
  156. 1650 k=val(a$)
  157. 1660 onkgoto1680,1930,2060,2570,510
  158. 1670 poke512,32:return
  159. 1680 print"[147][129]":poke53280,.:poke53281,.
  160. 1690 printtab(40)"                                        ";
  161. 1700 print"    this routine will scratch a file    ";
  162. 1710 print"                                        "
  163. 1720 printtab(42)"press return to exit"
  164. 1730 printtab(42)"enter '$' to list the file directory."
  165. 1740 print"[158]----------------------------------------";
  166. 1750 ifff=34then1790
  167. 1760 poke19,32:print"[155] enter filename :";:gosub60500:ff$=b$:poke19,.:print
  168. 1770 ifff$="$"thengosub840:goto1680
  169. 1780 ifff$=""then470
  170. 1790 b$="[155]scratch seq file [150]"+chr$(34)+ff$+chr$(34)
  171. 1800 ff=0:print""tab(21-len(b$)/2)b$
  172. 1810 printtab(90)"[158]are you sure?? (y/n)"
  173. 1820 getk$:ifk$<>"y"andk$<>"n"then1820
  174. 1830 ifk$<>"y"thenff$="":goto1680
  175. 1840 b$=" scratching  "+ff$+" ":printtab(20-len(b$)/2)b$
  176. 1850 print#15,"s0:"ff$
  177. 1860 input#15,er,er$,t,b:ifk=2ork=3thenreturn
  178. 1870 g9$=left$(er$,4)+right$(er$,10)
  179. 1880 e9$=" "+ff$+" [146] "+g9$
  180. 1890 ift=.thenprinttab(48)"**** file not found ****":gosub1270:goto1680
  181. 1900 ift=.thenfori=1to1500:next:goto1680
  182. 1910 printtab(60-len(e9$)/2)e9$
  183. 1920 gosub1020:fori=1to1000:next:goto470
  184. 1930 forx=20to23:poke781,x:sys59903:next
  185. 1940 print"":poke214,20:print:printtab(9)"old name = ";
  186. 1950 ifff=34thenff=0:print""ff$;:pn$=ff$:poke783,.:goto1980
  187. 1960 poke19,32:input"$[157]";pn$:poke19,.:print:ifpn$="4"then510
  188. 1970 ifpn$="$"thenff$=pn$:poke150,96:syssp:gosub840:poke150,96:sysgp:goto1940
  189. 1980 poke214,21:print
  190. 1990 printtab(9)"new name = ";
  191. 2000 poke19,32:print" ";:gosub60500:nn$=b$:poke19,.:poke781,21
  192. 2005 sys 59903:poke214,21:print
  193. 2010 ifnn$="4"then510
  194. 2020 cn$ =" "+pn$+" [146] is "+nn$+" [146]":iflen(cn$)<33thencn$ = cn$+"      "
  195. 2030 print "[158]"tab(22-len(cn$)/2)cn$"[145][145]":print#15,"r0:"+nn$+"="+pn$
  196. 2040 gosub1390:ifethen470:remrwk
  197. 2050 gosub1020:goto470
  198. 2060 print tab(2)"[158]          ---warning!!!---          "
  199. 2070 print"  all data on the disk to be formatted"
  200. 2080 print"  will be destroyed - ok to continue?"
  201. 2090 poke198,.:wait198,1:geta$:poke198,.:ifa$<>"y"then510
  202. 2100 print"[145][154]   okay - formatting takes 90 seconds"
  203. 2110 print#15,"n:ultra seq-files,rk":gosub1860:ifer<>0thengosub1400
  204. 2120 goto510
  205. 2130 close4:open4,4,7:gosub1330:ifqqthen470
  206. 2140 l=0:print"[147][151]":poke53280,11:poke53281,11
  207. 2150 poke53272,23:print""tab(3)"                                  "
  208. 2160 printtab(3)" << [210]eading [198]ile [201]nto an [193]rray >> "
  209. 2170 printtab(3)"                                  "
  210. 2180 poke787,25:poke2,15:sysoc
  211. 2190 iflthenprint""tab(43)"[155] << [210]eading [198]ile [201]nto an [193]rray >> "
  212. 2200 poke214,23:print
  213. 2210 print"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":iflthenl=0:goto2240
  214. 2220 open2,8,2,ff$:gosub1390:ifethen460
  215. 2230 yy=1:pokecr-2,0:syscr
  216. 2240 fork=1to112:a$(k)="":next:u=0
  217. 2250 on-(peek(cr-3)<>0)goto2330:ifpeek(cr-2)>80thenpoke(cr-2),0
  218. 2260 forx=0topeek(cr-2):aa$=chr$(peek(512+x))
  219. 2270 a$(yy)=a$(yy)+aa$:iflen(a$(yy))>40thenyy=yy+1
  220. 2280 next:sysso:poke214,19:print:printa$(yy):yy=yy+1:on-(peek(600)=0)gosub1670:sysww
  221. 2290 ifpeek(653)=1thenpoke214,23:print:print"  [150][210][197][204][197][193][211][197][153] to [195]ontinue [145]":u=1
  222. 2300 ifpeek(653)=1thenon-(peek(197)=6)goto2440:goto2290
  223. 2310 ifuthenprint"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":u=0
  224. 2320 on-(yy=112)goto2350:print:goto2250
  225. 2330 forx=0topeek(cr-2)-1:aa$=chr$(peek(512+x)):a$(yy)=a$(yy)+aa$:next
  226. 2340 sysso:poke214,19:print:printa$(yy):close2:sys65511:open4,4,7
  227. 2350 print""tab(44)"[155]      << [196]ata to [208]rinter >>     "
  228. 2360 fori=1to5:print#4:next
  229. 2370 ifyy/2<>int(yy/2)thenyy=yy+1
  230. 2380 i1=yy/2:forii=1toi1
  231. 2390 print#4,a$(ii);tab(40-len(a$(ii)));a$(ii+i1)
  232. 2400 ifpeek(653)=1thenpoke214,23:print:print"  [150][210][197][204][197][193][211][197][153] to [195]ontinue [145]":u=1
  233. 2410 ifpeek(653)=1thenon-(peek(197)=6)goto2440:goto2400
  234. 2420 ifuthenprint"  [150][200][207][204][196] [211][200][201][198][212][153] to [208]ause ---- [158][198]6[153] to [193]bort[145][145][145][159]":u=0
  235. 2430 next:fori=1to5:print#4:next:ifyy>111thenyy=1::l=1:goto2190
  236. 2440 t=1:gosub1230:close2:syscc:print"[147]":poke53280,.:poke53281,.:sys65511
  237. 2450 open15,8,15:bob=0:goto470
  238. 2460 poke2025,7:run
  239. 2470 ford=1to1200:next:return
  240. 2480 s=1-s:gosub2540
  241. 2490 print"[158] sound":ifsthenprint"  on "
  242. 2500 ifs=0thenprint"  off"
  243. 2510 print""tab(33)"[145][145]ascii":ifathenprint""tab(34)"[145]on "
  244. 2520 on-(a=1)goto710:print""tab(34)"[145]off":goto710
  245. 2530 return
  246. 2540 on-(ns=1)goto2530:fori=54272toi+23:pokei,.:next
  247. 2550 si=54272:pokesi+1,106:pokesi+5,12:pokesi+6,15
  248. 2560 pokesi+24,15:pokesi+15,30:pokesi+4,21:return
  249. 2570 sysez
  250. 2580 poke214,23:print:printtab(10)"[158] any key to continue ";:wait198,1:poke198,.
  251. 2590 goto460
  252. 60500 poke198,.:b$="":print"[164]";:fora=1to17
  253. 60510 geta$:ifa$=""then60510
  254. 60520 ifa$=chr$(13)then print"[157] ":return
  255. 60530 ifa$=chr$(20)anda>1thenprint"[157][157]  [157][157][164]";:a=a-1:b$=left$(b$,a-1):goto60510
  256. 60535 ifa$=chr$(20)then60510
  257. 60540 if(a=17)or((nu)and(a=6))then60510
  258. 60545 ifa$>="0"anda$=<"9"then 60560
  259. 60546 if nu=1then 60510
  260. 60547 ifa$=>"[193]"anda$<="[218]"then 60560
  261. 60550 ifa$<" "ora$>"z"then60510
  262. 60560 print"[157]";a$;:poke212,.:print"[164]";:b$=b$+a$:next
  263.